<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ taglib prefix="sb" uri="/struts-bootstrap-tags"%>


<script>
	$.subscribe('refreshKalendar', function(event, data) {
		$("#content").html("");
		$.publish('reloadAgenda');
		$.publish('reloadKalendar');

		$("#kodeWarna").spectrum("destroy");
	});
</script>


<body>
	<%-- <sj:dialog id="setPimpinanDialog" autoOpen="false" modal="true"
		title="Set Pimpinan" openTopics="openRemoteDialog" width="600"
		height="300" />
 --%>
	

	<s:url var="urlPejabat" action="modul/agendapimpinan/page/pejabat" />

	<s:url var="urlKalendar" action="modul/agendapimpinan/page/kalendar" />

	<s:url var="urlAgenda" action="modul/agendapimpinan/page/daftaragenda">
		<s:param name="jabatanId" value="%{jabatan.id}"></s:param>
	</s:url>


	<s:url var="urlPimpinan" action="modul/agendapimpinan/page/daftarpejabat">
		<s:param name="jabatanId" value="%{jabatan.id}"></s:param>
	</s:url>

	<s:url var="logoutUrl" action="logout" />

	<div class="navbar ">
		<div class="navbar-inner norm-navbar-inner" id="divCariPegawai">
			<div class="container" style="width: auto;">
				<ul class="nav">
					<li class="active"><a class="brand">Sekreatariat Pimpinan</a></li>
					<li></li>
					<li><s:if test="%{setPimpinan == true}">
							<sj:a href="%{pimpinanAddUrl}" onClickTopics="openRemoteDialog">
								<s:property value="pimpinan.nip" /> | <s:property
									value="pimpinan.nama" />
							</sj:a>
						</s:if> <s:else>
							<sj:a href="%{pimpinanAddUrl}" onClickTopics="openRemoteDialog">
								Tentukan Pimpinan Anda
							</sj:a>
						</s:else></li>
					<li class="divider-vertical"></li>
					<li><s:form cssClass="navbar-form pull-left"
							id="formCariPegawai">
							<s:textfield name="searchString" cssClass="search-query"
								placeholder="Cari Agenda" />
						</s:form> <sj:submit id="btnSearch" href="%{urlCariPegawai}"
							targets="resultTarget" value="Cari" indicator="indicator"
							button="true" cssClass="btn" formIds="formCariPegawai" /></li>
					<li><s:a href="%{logoutUrl}">Log Out</s:a></li>
				</ul>
			</div>
		</div>
	</div>


	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span4">
				<sj:div href="%{urlAgenda}" id="listAgenda"
					reloadTopics="reloadAgenda">
				</sj:div>

				<sj:div href="%{urlPimpinan}" id="listPejabat"></sj:div>
			</div>
			<div class="span8">

				<sj:div href="%{urlKalendar}" id="resultKalendar"
					reloadTopics="reloadKalendar"></sj:div>

			</div>
		</div>
	</div>

	<br />
	<%-- <tiles:insertAttribute name="footer"></tiles:insertAttribute> --%>
	<div id="empty"></div>